package com.fyy.shardingjdbc.service.impl;

import com.fyy.shardingjdbc.dao.UserDao;
import com.fyy.shardingjdbc.model.User;
import com.fyy.shardingjdbc.service.IUserService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements IUserService {

    @Resource
    private UserDao userDao;

    @Override
    public List<User> selectUserList(User user) {
        return userDao.selectUserList(user);
    }

    @Override
    public User selectUserById(User user) {
        return userDao.selectUserById(user);
    }

    @Override
    public int insertUser(User user) {
        return userDao.insertUser(user);
    }

    @Override
    public int updateUser(User user) {
        return userDao.updateUser(user);
    }

    @Override
    public int delUser(User user) {
        return userDao.delUser(user);
    }

}
